package com.anpy.bill.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@Data
@TableName(value = "T_STATISTICS_BILL")
public class BillStatisticsEntity {

    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField(value = "user_id")
    private Integer userId = 1;
    @JsonFormat(pattern = "yyyy-MM")
    @DateTimeFormat(pattern = "yyyy-MM")
    @TableField(value = "date")
    private String date;
    @TableField(value = "expend_money")
    private Double expendMoney = 0.0;
    @TableField(value = "earning_money")
    private Double earningMoney = 0.0;
    private Integer classifyId;

}
